<template>
  <div id="about"></div>
</template>

<script>
export default {
  data () {
    return {
      obj: {
        name: '888',
        age: 89,
        sex: '男'
      },
      arr: ['666', '656', '669']
    }
  },
  created () { this.handle() },
  methods: {
    handle () {
      const that = this
      for (var i = 0; i < this.arr.length; i++) {
        if (this.arr.length === 3) {
          setInterval(function () {
            console.log(that.obj.name)
          }, 1000)
        } else if (this.arr[0] === this.obj.age) {
          console.log(123)
        }
      }
    }
  }
}
</script>

<style lang="less" scoped>
  #about {
    height: 200px;
    width: 200px;
    border-radius: 3px;
    background-color:pink;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
  }
</style>
